<?php

namespace app\common\model\user;

use app\common\model\goods\Category;
use think\Model;

class Region extends Model
{
    // 表名
    protected $name = 'user_region';

    public function firstcate()
    {
        return $this->belongsTo(Category::class, 'first_cate', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function twocate()
    {
        return $this->belongsTo(Category::class, 'two_cate', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
